<?php
/* @var $this SiteController */

$this->pageTitle=Yii::app()->name;
?>

<h1>Welcome to <b style="font-family:fantasy; color:lightskyblue;"><?php echo CHtml::encode(Yii::app()->name); ?></b></h1>
<p>
	<?php if (Yii::app()->user->isGuest):?>
    	<h3 style="font-style:italic;">Please login to manage Users and Configurations<br /><br />Users only be managed by adminstrators</h3>
    <?php else:?>
        <ul class="home-list-features">
            <?php
                $loggedInUser = Yii::app()->user->__isset('loggedInUser') ? Yii::app()->user->loggedInUser : null;
                if ($loggedInUser != null && $loggedInUser->isadmin):
            ?>
            <li><?php echo CHtml::link('Manage Users', Yii::app()->createUrl('admin/user/list')); ?></li>
            <?php endif?>
            <li><?php echo CHtml::link('Manage Configurations', Yii::app()->createUrl('configuration/list')); ?></li>
            <li><?php echo CHtml::link('Reports (not implemented)', Yii::app()->createUrl('report')); ?></li>
        </ul>
    <?php endif?>
</p>
